﻿using MongoDB.Driver;
using Sustainalytics.Entities.RiskRatings;
using System.Threading.Tasks;
using Sustainalytics.Entities;

namespace Sustainalytics.ClientDW.Synchronization.SyncRiskRatingsData.Indexes
{


    public static class RiskRatingsGovernancePillarsIndexes
    {
        public static async Task RecreateIndexes(IMongoCollection<GovernancePillars> collection)
        {
            await collection.Indexes.CreateOneAsync(Builders<GovernancePillars>.IndexKeys.Ascending(x => x.Id)).ConfigureAwait(false);
            await collection.Indexes.CreateOneAsync(Builders<GovernancePillars>.IndexKeys.Ascending(x => x.CompanyId)).ConfigureAwait(false);
            await collection.Indexes.CreateOneAsync(Builders<GovernancePillars>.IndexKeys.Ascending(x => x.Name)).ConfigureAwait(false);
        }
    }
}